const City = () => import('@/components/movie/City')
const HotShowing = () => import('@/components/movie/HotShowing')
const ComingSoon = () => import('@/components/movie/ComingSoon')
const Search = () => import('@/components/movie/Search')
const MovieDetail = () => import ('@/views/Movie/MovieDetail')
export default {
    path: '/movie',
    name: 'movie',
    component: () => import('@/views/Movie'),
    children : [
        {
            path:'/movie',
            redirect: '/movie/hotShowing'
        },
        {
            path : 'city',
            component: City 
        },
        {
            path : 'hotShowing',
            component: HotShowing
        },
        {
            path : 'comingSoon',
            component: ComingSoon
        },
        {
            path : 'search',
            component: Search
        },
        {
            path: 'movieDetail/1/:movieId',
            components: {   
                default: HotShowing,
                movieDetail: MovieDetail
            },
            props: { // 路由组件传参 代替$route.params
                movieDetail: true 
            }  
        },
        {
            path: 'movieDetail/2/:movieId',
            components: {   
                default: ComingSoon,
                movieDetail: MovieDetail
            },
            props: { // 路由组件传参 代替$route.params
                movieDetail: true 
            }  
        }
    ]
}